package com.mtnz.njk.Mapper;

import com.mtnz.njk.entity.*;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.HashMap;
import java.util.List;

@org.apache.ibatis.annotations.Mapper
public interface NjkUserMapper extends Mapper<NjkUserEntity> {
    // 查询商品名字
    HashMap<String, String> selectProductName(@Param("productId") String productId) throws Exception;

    // 查询用户名称
    String selectUserName(@Param("userId") String userId) throws Exception;

    // 查询用户的收货地址
    List<NjkUserAddressEntity> listUserAddress(@Param("userId") String userId) throws Exception;

    // 用户其他地址设为非默认
    Integer updateOtherAddress(NjkUserAddressEntity addressEntity) throws Exception;

    // 查询用户所有代金券
    List<CouponEntity> queryAllCoupon(@Param("userId") String userId) throws Exception;

    // 查询用户签到信息
    UserSignEntity getUserSign(@Param("userId") String userId) throws Exception;

    // 查询用户任务信息
    UserTaskEntity getUserTask(@Param("userId") String userId) throws Exception;

    // 查询所有订单商品数据
    List<OrderProductEntity> getOrderProducts() throws Exception;

}
